<template>
  <div>
    <el-table
      :data="detailList"
      border
      :show-header="false"
      style="width: 100%"
    >
      <el-table-column
        width="120"
      >
        <template slot-scope="{ row }">
          {{ row.label }}:
        </template>
      </el-table-column>
      <el-table-column>
        <template slot-scope="{ row }">
          {{ row.dictCode ?
            getDictText(row.dictCode, dataList[row.prop]) :
            dataList[row.prop] }}
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import dictMixin from '@/utils/mixins/dict'

export default {
  name: 'DialogDetail',
  mixins: [
    dictMixin(['interface_type', 'interface_protocol'])
  ],
  props: {
    'dataList': {
      type: Object
    }
  },
  data() {
    return {
      detailList: [
        { label: '服务名称', prop: 'serviceName' },
        { label: '系统名称', prop: 'systemName' },
        { label: '接口方式', prop: 'interfaceType', dictCode: 'interface_type' },
        { label: '接口地址', prop: 'interfaceAddress' },
        { label: '接口协议', prop: 'interfaceProtocol', dictCode: 'interface_protocol' }
      ]
    }
  }
}
</script>

<style scoped lang="scss">
.open_ser_row{
  width: 100%;
  padding: 0 50px;
  margin-bottom: 30px;
  .open_ser_col{
    display: flex;
    .open_ser_div_name{
      margin-right: 5px;
      margin-bottom: 5px;
      font-weight: 600;
      font-size: 15px;
    }
  }
}
</style>
